<?php

$email = "eg@gmail.com";

//echo "from constabt" . __FILE__ ."<br>";
//echo "from \$_SERVER['PHP_SELF']" . $_SERVER['PHP_SELF'] ."<br/>"

?>









<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <title>Semicolon PHP course</title>

  <style type="text/css">

      .input_element{
        background:#EEEEEE;
       }
       
       body {
           
        text-align:center;   
        }


  </style>


</head>
<body>
    <form method="post" action="<?php echo $_SERVER['PHP_SELF'];?>">
    Username: <input class="input_element" type="text" name="username" value=""/><br/><br/>
    Password: <input class="input_element" type="password" name="password" value=""/><br/><br/>
    Email: <input class="input_element" type="text" name="email" value="<?php echo $email;?>"/><br/><br/>
    about :
    <textarea class="input_element" cols="60" rows="10" name="about">

    </textarea>
<br/>
<br/>
    <input type="submit" name="submit" value="Submit"

</form>


<br/>
<br/>
<br/><br/><br/><br/>

<br/><br/>



<?php
/*
echo "<pre>";
print_r($_POST);
echo "</pre>";
*/


$submit = $_POST['submit'];

$username =  $_POST['username'];
$pass = $_POST['password'];
$email = $_POST['email'];
$about = $_POST['about'];


if($submit != "" && $username !="" && $pass != ""  ) {


echo "Hi, $username k chha? I think your password is $pass. That's fine. I will email you at $email.";

} else {

    echo "please; provide form data";

}



?>
    

</body>
</html>
